//
//  XS_BindNewMobileVC.swift
//  XueDao
//
//  Created by Mac on 2020/12/12.
//

import UIKit

class XS_BindNewMobileVC: XS_BaseVC {

    @IBOutlet weak var mobileTextField: QMUITextField!
    @IBOutlet weak var areaBtn: QMUIButton!
    override func viewDidLoad() {
        super.viewDidLoad()
        
        // Do any additional setup after loading the view.
        areaBtn.imagePosition = .right
        areaBtn.spacingBetweenImageAndTitle = 5
    }

    @IBAction func areaCodeBtnAction(_ sender: QMUIButton) {
        //去到国家选择
    }
    
    @IBAction func confirmBtnAction(_ sender: UIButton) {
        mobileTextField.resignFirstResponder()
        guard let text = mobileTextField.text, text.xsCheck(.phone) else {
            self.view.xsShowMsg("请正确输入手机号")
            return
        }
        //去到发验证码页面
        let vc = XS_VerificationCodeVC()
        vc.phone = mobileTextField.text ?? ""
        vc.isBind = true
        navigationController?.pushViewController(vc, animated: true)
    }

}
